<template>
  <div>
    <h1>列表页</h1>
    这里是列表

    <ul>
      <li> id 1 <router-link to="/admin/edit/1">编辑</router-link><span @click="onDel(1)">删除</span>
      </li>
      <li> id 2 <router-link to="/admin/edit/2">编辑</router-link><span @click="onDel(2)">删除</span>
      </li>
      <li> id 3 <router-link to="/admin/edit/3">编辑</router-link><span @click="onDel(2)">删除</span>
      </li>
      <li> id 4 <router-link to="/admin/edit/4">编辑</router-link><span @click="onDel(4)">删除</span>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  methods: {
    onDel(id) {
      console.log(id);
    },
  },
};
</script>